# Maintainer: Laurent Carlier <lordheavym@gmail.com>

pkgname=vulkan-headers
_pkgname=Vulkan-Headers
pkgver=1.1.85+103+2fd5a24
pkgrel=1
epoch=1
pkgdesc="Vulkan header files"
arch=(any)
url="https://www.khronos.org/vulkan/"
license=('APACHE')
makedepends=(cmake git)
provides=("vulkan-hpp=${pkgver}")
groups=(vulkan-devel)
#source=("${pkgname}-${pkgver}.tar.gz::https://github.com/KhronosGroup/${_pkgname}/archive/sdk-${pkgver}.tar.gz")
source=("git+https://github.com/KhronosGroup/Vulkan-Headers.git#commit=2fd5a24ec4a6df303b2155b3f85b6b8c1d56f6c0")
sha256sums=('SKIP')

pkgver() {
  cd Vulkan-Headers

  echo 1.1.85+$(git rev-list --count HEAD)+$(git rev-parse --short HEAD)
}

build() {
  cd Vulkan-Headers

  rm -rf build ; mkdir build ; cd build
  cmake -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_BUILD_TYPE=Release \
    ..
  make
}

package() {
  cd Vulkan-Headers/build
  
  make DESTDIR="${pkgdir}" install
}
